package com.yeyaomai.dksns.dao;

import java.util.List;

import org.springframework.data.mongodb.core.mapreduce.GroupByResults;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;

public interface MarketingMongo {
	
	/**
	 * 分组统计
	 * @return 
	 */
	public <T> GroupByResults<T> group(Criteria criteria, String key, String map, String reduce, Class<T> clas);
	
	/**
	 * 分组统计 多参
	 * @return 
	 */
	public <T> GroupByResults<T> groups(Criteria criteria, String map, String reduce, Class<T> clas, String...key);
	/**
	 * 按条件查询
	 * @return
	 */
	public <T> List<T>  findList(Criteria criteria);
	
	public <T> List<T> findList(Query query);
	
	public Object findOne(Query query);
}
